package com.qdxwx.models.account;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

public class UserAccountDetail implements Serializable {

    private static final long serialVersionUID = -8921918609050191897L;
    private long id;
    private long userId;// 用户id
    private String userName ;//昵称
    private String email ;//邮箱
    private String mobile;//手机号
    private int orderId;// 订单id
    private long otherId;// 相关ID
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    private int isDisplay;// 是否显示账户历史记录:0显示;1不显示
    private int balance;// 当前余额
    private int vmAmount;// vm余额
    private int backAmount;// 分销返现余额
    private int orderAmount;// 交易金额
    private String description;// 账户历史内容描述
    private String actHistoryType;// 帐务历史类型.充值。消费等
    private String bizType;// 业务类型(课程订单、会员订单、图书订单)
    private long version;// 乐观锁版本号

    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;	//开始时间
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;		//结束时间

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public long getOtherId() {
        return otherId;
    }

    public void setOtherId(long otherId) {
        this.otherId = otherId;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public int getIsDisplay() {
        return isDisplay;
    }

    public void setIsDisplay(int isDisplay) {
        this.isDisplay = isDisplay;
    }

    public int getBalance() {
        return balance;
    }

    public void setBalance(int balance) {
        this.balance = balance;
    }

    public int getVmAmount() {
        return vmAmount;
    }

    public void setVmAmount(int vmAmount) {
        this.vmAmount = vmAmount;
    }

    public int getBackAmount() {
        return backAmount;
    }

    public void setBackAmount(int backAmount) {
        this.backAmount = backAmount;
    }

    public int getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(int orderAmount) {
        this.orderAmount = orderAmount;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getActHistoryType() {
        return actHistoryType;
    }

    public void setActHistoryType(String actHistoryType) {
        this.actHistoryType = actHistoryType;
    }

    public String getBizType() {
        return bizType;
    }

    public void setBizType(String bizType) {
        this.bizType = bizType;
    }

    public long getVersion() {
        return version;
    }

    public void setVersion(long version) {
        this.version = version;
    }

    public LocalDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }

    @Override
    public String toString() {
        return "UserAccountDetail{" +
                "id=" + id +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", email='" + email + '\'' +
                ", mobile='" + mobile + '\'' +
                ", orderId=" + orderId +
                ", otherId=" + otherId +
                ", createTime=" + createTime +
                ", isDisplay=" + isDisplay +
                ", balance=" + balance +
                ", vmAmount=" + vmAmount +
                ", backAmount=" + backAmount +
                ", orderAmount=" + orderAmount +
                ", description='" + description + '\'' +
                ", actHistoryType='" + actHistoryType + '\'' +
                ", bizType='" + bizType + '\'' +
                ", version=" + version +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                '}';
    }
}
